package com.shum1n.gmall.order.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.shum1n.gmall.bean.UserInfo;
import com.shum1n.gmall.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @Reference
    private UserService userService;

    /**
     * http://localhost:8089/trade?id=1
     * @param id
     * @return
     */
    @GetMapping("/trade")
    public UserInfo trade(String id){
        UserInfo userInfo = userService.getUserInfoById(id);
        return userInfo;
    }


}
